/**
* All Rights Reserved , Copyright (C) 2021 , 青岛鼎信通讯股份有限公司
*
* MpmProjectMilepostServiceAuto
* 项目策划-里程碑及任务
*
* 修改纪录
* 2021-01-06 版本：1.0 wudaliang 创建。
* @version 版本：1.0
* @author 作者：wudaliang
* 创建日期：2021-01-06
*/

package com.topscomm.mpm.service.impl.auto;

import com.topscomm.mpm.pojo.MpmProjectEntity;
import com.topscomm.mpm.pojo.MpmProjectTaskEntity;
import com.topscomm.mpm.service.impl.MpmProjectService;
import com.topscomm.mpm.service.impl.MpmProjectTaskService;
import com.topscomm.pub.util.SpringUtil;
import com.topscomm.pub.util.StringBufferProxy;

import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mpm.*;
import com.topscomm.mpm.pojo.MpmProjectMilepostEntity;
import com.topscomm.mpm.dao.IMpmProjectMilepostDao;
import org.springframework.beans.factory.annotation.Autowired;


public class MpmProjectMilepostServiceAuto extends MpmService<MpmProjectMilepostEntity,IMpmProjectMilepostDao> {

	@Autowired
	private MpmProjectService mpmProjectService;

	/**
	 * @author: wudaliang
	 * @date: 2021-01-06
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("actualfinishtime") != null) {
			temp = mapRow.get("actualfinishtime").toString();
			mapRow.put("dispactualfinishtime", datacodeCache.getValueDynamic("EhrHonorlevel", temp, "code", "name"));
		}
		if (mapRow.get("milepoststate") != null) {
			temp = mapRow.get("milepoststate").toString();
			mapRow.put("dispmilepoststate", datacodeCache.getValueDynamic("MpmMilePostState", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "mpmProjectMilepostDao")
	public void setDao(IBasicDao<MpmProjectMilepostEntity> dao) {
		super.setDao(dao);
	}
}
